﻿@{
    var settings = WebMvc.Controllers.ObjetosController.GridViewSettings;
    settings.Columns.Add(column =>
    {
        column.Caption = "Acciones";
        column.SetDataItemTemplateContent(c =>
        {
            ViewContext.Writer.Write(Html.ActionLink("Detalle", "Details", new { id = DataBinder.Eval(c.DataItem, "Guid") }, new { @class = "icDetails", alt = "Detalles", title = "Detalles" }));
            ViewContext.Writer.Write(Html.ActionLink("Editar", "Edit", new { id = DataBinder.Eval(c.DataItem, "Guid") }, new { @class = "icEdit", alt = "Editar", title = "Editar" }));
            ViewContext.Writer.Write(Html.ActionLink("Eliminar", "Delete", new { id = DataBinder.Eval(c.DataItem, "Guid") }, new { @class = "icDelete delete", alt = "Eliminar", title = "Eliminar" }));
        });
        column.Settings.AllowDragDrop = DevExpress.Utils.DefaultBoolean.False;
        column.Settings.AllowSort = DevExpress.Utils.DefaultBoolean.False;
        column.Width = System.Web.UI.WebControls.Unit.Percentage(20);
    });
}

@Html.DevExpress().GridView(settings).Bind(Model).GetHtml()